﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// CICarInfo数据模型对象
    /// </summary>
    [Serializable]
    public partial class CICarInfoMod : IEntity, IEntityTypeBuilder<CICarInfoMod>
    {
        #region 属性存储数据的变量
        //属性存储数据的变量
        private string _no;
        private string _carPlateNo;
        private string _color;
        private string _motorcade;
        private string _carID;
        private string _model;
        private byte[] _iMG;
        private string _vINNo;
        private string _deviceNo;
        private string _companyID;
        private string _brand;
        private string _spec;
        private string _sIMCard;
        private string _sIMPwd;
        private decimal? _upSpeed;
        private int? _duration;
        private decimal? _totalMileAge;
        private string _hostName;
        private string _hostPhone;
        private string _carModel;
        private string _carColor;
        private DateTime? _expireTime;
        private string _queryPwd;
        private string _iDNumber;
        private string _dayPhone;
        private string _nightPhone;
        private string _carType;
        private DateTime? _installTime;
        private string _installMan;
        private string _installType;
        private bool _isWaste;
        private bool _areaPower;
        private string _remark;
        private bool? _dOAlarmInstalled;
        private bool? _dOAlarmEnable;
        private int? _dOAlarmValue;
        private DateTime? _dOSMSSentTime;
        private bool? _dOSMSHasSent;
        private bool _isToGB;
        private string _paraData;
        private string _corpid;
        private string _deptid;
        private DateTime? _lastTime;
        private decimal _pulseCoeff;
        private DateTime _cTime;
        private int _accCheck;
        #endregion

        #region GET SET
        /// <summary>
        /// No
        /// </summary>
        public string No
        {
            get { return this._no; }
            set { this._no = value; }
        }
        /// <summary>
        /// CarPlateNo
        /// </summary>
        public string CarPlateNo
        {
            get { return this._carPlateNo; }
            set { this._carPlateNo = value; }
        }
        /// <summary>
        /// Color
        /// </summary>
        public string Color
        {
            get { return this._color; }
            set { this._color = value; }
        }
        /// <summary>
        /// Motorcade
        /// </summary>
        public string Motorcade
        {
            get { return this._motorcade; }
            set { this._motorcade = value; }
        }
        /// <summary>
        /// CarID
        /// </summary>
        public string CarID
        {
            get { return this._carID; }
            set { this._carID = value; }
        }
        /// <summary>
        /// Model
        /// </summary>
        public string Model
        {
            get { return this._model; }
            set { this._model = value; }
        }
        /// <summary>
        /// IMG
        /// </summary>
        public byte[] IMG
        {
            get { return this._iMG; }
            set { this._iMG = value; }
        }
        /// <summary>
        /// VINNo
        /// </summary>
        public string VINNo
        {
            get { return this._vINNo; }
            set { this._vINNo = value; }
        }
        /// <summary>
        /// DeviceNo
        /// </summary>
        public string DeviceNo
        {
            get { return this._deviceNo; }
            set { this._deviceNo = value; }
        }
        /// <summary>
        /// CompanyID
        /// </summary>
        public string CompanyID
        {
            get { return this._companyID; }
            set { this._companyID = value; }
        }
        /// <summary>
        /// Brand
        /// </summary>
        public string Brand
        {
            get { return this._brand; }
            set { this._brand = value; }
        }
        /// <summary>
        /// Spec
        /// </summary>
        public string Spec
        {
            get { return this._spec; }
            set { this._spec = value; }
        }
        /// <summary>
        /// SIMCard
        /// </summary>
        public string SIMCard
        {
            get { return this._sIMCard; }
            set { this._sIMCard = value; }
        }
        /// <summary>
        /// SIMPwd
        /// </summary>
        public string SIMPwd
        {
            get { return this._sIMPwd; }
            set { this._sIMPwd = value; }
        }
        /// <summary>
        /// UpSpeed
        /// </summary>
        public decimal? UpSpeed
        {
            get { return this._upSpeed; }
            set { this._upSpeed = value; }
        }
        /// <summary>
        /// Duration
        /// </summary>
        public int? Duration
        {
            get { return this._duration; }
            set { this._duration = value; }
        }
        /// <summary>
        /// TotalMileAge
        /// </summary>
        public decimal? TotalMileAge
        {
            get { return this._totalMileAge; }
            set { this._totalMileAge = value; }
        }
        /// <summary>
        /// HostName
        /// </summary>
        public string HostName
        {
            get { return this._hostName; }
            set { this._hostName = value; }
        }
        /// <summary>
        /// HostPhone
        /// </summary>
        public string HostPhone
        {
            get { return this._hostPhone; }
            set { this._hostPhone = value; }
        }
        /// <summary>
        /// CarModel
        /// </summary>
        public string CarModel
        {
            get { return this._carModel; }
            set { this._carModel = value; }
        }
        /// <summary>
        /// CarColor
        /// </summary>
        public string CarColor
        {
            get { return this._carColor; }
            set { this._carColor = value; }
        }
        /// <summary>
        /// ExpireTime
        /// </summary>
        public DateTime? ExpireTime
        {
            get { return this._expireTime; }
            set { this._expireTime = value; }
        }
        /// <summary>
        /// QueryPwd
        /// </summary>
        public string QueryPwd
        {
            get { return this._queryPwd; }
            set { this._queryPwd = value; }
        }
        /// <summary>
        /// IDNumber
        /// </summary>
        public string IDNumber
        {
            get { return this._iDNumber; }
            set { this._iDNumber = value; }
        }
        /// <summary>
        /// DayPhone
        /// </summary>
        public string DayPhone
        {
            get { return this._dayPhone; }
            set { this._dayPhone = value; }
        }
        /// <summary>
        /// NightPhone
        /// </summary>
        public string NightPhone
        {
            get { return this._nightPhone; }
            set { this._nightPhone = value; }
        }
        /// <summary>
        /// CarType
        /// </summary>
        public string CarType
        {
            get { return this._carType; }
            set { this._carType = value; }
        }
        /// <summary>
        /// InstallTime
        /// </summary>
        public DateTime? InstallTime
        {
            get { return this._installTime; }
            set { this._installTime = value; }
        }
        /// <summary>
        /// InstallMan
        /// </summary>
        public string InstallMan
        {
            get { return this._installMan; }
            set { this._installMan = value; }
        }
        /// <summary>
        /// InstallType
        /// </summary>
        public string InstallType
        {
            get { return this._installType; }
            set { this._installType = value; }
        }
        /// <summary>
        /// IsWaste
        /// </summary>
        public bool IsWaste
        {
            get { return this._isWaste; }
            set { this._isWaste = value; }
        }
        /// <summary>
        /// AreaPower
        /// </summary>
        public bool AreaPower
        {
            get { return this._areaPower; }
            set { this._areaPower = value; }
        }
        /// <summary>
        /// Remark
        /// </summary>
        public string Remark
        {
            get { return this._remark; }
            set { this._remark = value; }
        }
        /// <summary>
        /// DOAlarmInstalled
        /// </summary>
        public bool? DOAlarmInstalled
        {
            get { return this._dOAlarmInstalled; }
            set { this._dOAlarmInstalled = value; }
        }
        /// <summary>
        /// DOAlarmEnable
        /// </summary>
        public bool? DOAlarmEnable
        {
            get { return this._dOAlarmEnable; }
            set { this._dOAlarmEnable = value; }
        }
        /// <summary>
        /// DOAlarmValue
        /// </summary>
        public int? DOAlarmValue
        {
            get { return this._dOAlarmValue; }
            set { this._dOAlarmValue = value; }
        }
        /// <summary>
        /// DOSMSSentTime
        /// </summary>
        public DateTime? DOSMSSentTime
        {
            get { return this._dOSMSSentTime; }
            set { this._dOSMSSentTime = value; }
        }
        /// <summary>
        /// DOSMSHasSent
        /// </summary>
        public bool? DOSMSHasSent
        {
            get { return this._dOSMSHasSent; }
            set { this._dOSMSHasSent = value; }
        }
        /// <summary>
        /// IsToGB
        /// </summary>
        public bool IsToGB
        {
            get { return this._isToGB; }
            set { this._isToGB = value; }
        }
        /// <summary>
        /// ParaData
        /// </summary>
        public string ParaData
        {
            get { return this._paraData; }
            set { this._paraData = value; }
        }
        /// <summary>
        /// Corpid
        /// </summary>
        public string Corpid
        {
            get { return this._corpid; }
            set { this._corpid = value; }
        }
        /// <summary>
        /// Deptid
        /// </summary>
        public string Deptid
        {
            get { return this._deptid; }
            set { this._deptid = value; }
        }
        /// <summary>
        /// LastTime
        /// </summary>
        public DateTime? LastTime
        {
            get { return this._lastTime; }
            set { this._lastTime = value; }
        }
        /// <summary>
        /// PulseCoeff
        /// </summary>
        public decimal PulseCoeff
        {
            get { return this._pulseCoeff; }
            set { this._pulseCoeff = value; }
        }
        /// <summary>
        /// CTime
        /// </summary>
        public DateTime CTime
        {
            get { return this._cTime; }
            set { this._cTime = value; }
        }
        /// <summary>
        /// AccCheck
        /// </summary>
        public int AccCheck
        {
            get { return this._accCheck; }
            set { this._accCheck = value; }
        }
        #endregion

        #region Equals GetHashCode ToString
        /// <summary>
        /// 对比两个CICarInfo数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的CICarInfo数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成CICarInfo数据模型对象
            CICarInfoMod cICarInfoMod = obj as CICarInfoMod;
            //判断是否转换成功
            if (cICarInfoMod == null) return false;
            //进行匹配属性的值
            return
                //判断No是否一致
                this.No == cICarInfoMod.No &&
                //判断CarPlateNo是否一致
                this.CarPlateNo == cICarInfoMod.CarPlateNo &&
                //判断Color是否一致
                this.Color == cICarInfoMod.Color &&
                //判断Motorcade是否一致
                this.Motorcade == cICarInfoMod.Motorcade &&
                //判断CarID是否一致
                this.CarID == cICarInfoMod.CarID &&
                //判断Model是否一致
                this.Model == cICarInfoMod.Model &&
                //判断IMG是否一致
                this.IMG == cICarInfoMod.IMG &&
                //判断VINNo是否一致
                this.VINNo == cICarInfoMod.VINNo &&
                //判断DeviceNo是否一致
                this.DeviceNo == cICarInfoMod.DeviceNo &&
                //判断CompanyID是否一致
                this.CompanyID == cICarInfoMod.CompanyID &&
                //判断Brand是否一致
                this.Brand == cICarInfoMod.Brand &&
                //判断Spec是否一致
                this.Spec == cICarInfoMod.Spec &&
                //判断SIMCard是否一致
                this.SIMCard == cICarInfoMod.SIMCard &&
                //判断SIMPwd是否一致
                this.SIMPwd == cICarInfoMod.SIMPwd &&
                //判断UpSpeed是否一致
                this.UpSpeed == cICarInfoMod.UpSpeed &&
                //判断Duration是否一致
                this.Duration == cICarInfoMod.Duration &&
                //判断TotalMileAge是否一致
                this.TotalMileAge == cICarInfoMod.TotalMileAge &&
                //判断HostName是否一致
                this.HostName == cICarInfoMod.HostName &&
                //判断HostPhone是否一致
                this.HostPhone == cICarInfoMod.HostPhone &&
                //判断CarModel是否一致
                this.CarModel == cICarInfoMod.CarModel &&
                //判断CarColor是否一致
                this.CarColor == cICarInfoMod.CarColor &&
                //判断ExpireTime是否一致
                this.ExpireTime == cICarInfoMod.ExpireTime &&
                //判断QueryPwd是否一致
                this.QueryPwd == cICarInfoMod.QueryPwd &&
                //判断IDNumber是否一致
                this.IDNumber == cICarInfoMod.IDNumber &&
                //判断DayPhone是否一致
                this.DayPhone == cICarInfoMod.DayPhone &&
                //判断NightPhone是否一致
                this.NightPhone == cICarInfoMod.NightPhone &&
                //判断CarType是否一致
                this.CarType == cICarInfoMod.CarType &&
                //判断InstallTime是否一致
                this.InstallTime == cICarInfoMod.InstallTime &&
                //判断InstallMan是否一致
                this.InstallMan == cICarInfoMod.InstallMan &&
                //判断InstallType是否一致
                this.InstallType == cICarInfoMod.InstallType &&
                //判断IsWaste是否一致
                this.IsWaste == cICarInfoMod.IsWaste &&
                //判断AreaPower是否一致
                this.AreaPower == cICarInfoMod.AreaPower &&
                //判断Remark是否一致
                this.Remark == cICarInfoMod.Remark &&
                //判断DOAlarmInstalled是否一致
                this.DOAlarmInstalled == cICarInfoMod.DOAlarmInstalled &&
                //判断DOAlarmEnable是否一致
                this.DOAlarmEnable == cICarInfoMod.DOAlarmEnable &&
                //判断DOAlarmValue是否一致
                this.DOAlarmValue == cICarInfoMod.DOAlarmValue &&
                //判断DOSMSSentTime是否一致
                this.DOSMSSentTime == cICarInfoMod.DOSMSSentTime &&
                //判断DOSMSHasSent是否一致
                this.DOSMSHasSent == cICarInfoMod.DOSMSHasSent &&
                //判断IsToGB是否一致
                this.IsToGB == cICarInfoMod.IsToGB &&
                //判断ParaData是否一致
                this.ParaData == cICarInfoMod.ParaData &&
                //判断Corpid是否一致
                this.Corpid == cICarInfoMod.Corpid &&
                //判断Deptid是否一致
                this.Deptid == cICarInfoMod.Deptid &&
                //判断LastTime是否一致
                this.LastTime == cICarInfoMod.LastTime &&
                //判断PulseCoeff是否一致
                this.PulseCoeff == cICarInfoMod.PulseCoeff &&
                //判断CTime是否一致
                this.CTime == cICarInfoMod.CTime &&
                //判断AccCheck是否一致
                this.AccCheck == cICarInfoMod.AccCheck;
        }
        /// <summary>
        /// 将当前CICarInfo数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将CICarInfo数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将No进行按位异或运算处理
                (this.No == null ? 2147483647 : this.No.GetHashCode()) ^
                //将CarPlateNo进行按位异或运算处理
                (this.CarPlateNo == null ? 2147483647 : this.CarPlateNo.GetHashCode()) ^
                //将Color进行按位异或运算处理
                (this.Color == null ? 2147483647 : this.Color.GetHashCode()) ^
                //将Motorcade进行按位异或运算处理
                (this.Motorcade == null ? 2147483647 : this.Motorcade.GetHashCode()) ^
                //将CarID进行按位异或运算处理
                (this.CarID == null ? 2147483647 : this.CarID.GetHashCode()) ^
                //将Model进行按位异或运算处理
                (this.Model == null ? 2147483647 : this.Model.GetHashCode()) ^
                //将IMG进行按位异或运算处理
                (this.IMG == null ? 2147483647 : this.IMG.GetHashCode()) ^
                //将VINNo进行按位异或运算处理
                (this.VINNo == null ? 2147483647 : this.VINNo.GetHashCode()) ^
                //将DeviceNo进行按位异或运算处理
                (this.DeviceNo == null ? 2147483647 : this.DeviceNo.GetHashCode()) ^
                //将CompanyID进行按位异或运算处理
                (this.CompanyID == null ? 2147483647 : this.CompanyID.GetHashCode()) ^
                //将Brand进行按位异或运算处理
                (this.Brand == null ? 2147483647 : this.Brand.GetHashCode()) ^
                //将Spec进行按位异或运算处理
                (this.Spec == null ? 2147483647 : this.Spec.GetHashCode()) ^
                //将SIMCard进行按位异或运算处理
                (this.SIMCard == null ? 2147483647 : this.SIMCard.GetHashCode()) ^
                //将SIMPwd进行按位异或运算处理
                (this.SIMPwd == null ? 2147483647 : this.SIMPwd.GetHashCode()) ^
                //将UpSpeed进行按位异或运算处理
                (this.UpSpeed == null ? 2147483647 : this.UpSpeed.GetHashCode()) ^
                //将Duration进行按位异或运算处理
                (this.Duration == null ? 2147483647 : this.Duration.GetHashCode()) ^
                //将TotalMileAge进行按位异或运算处理
                (this.TotalMileAge == null ? 2147483647 : this.TotalMileAge.GetHashCode()) ^
                //将HostName进行按位异或运算处理
                (this.HostName == null ? 2147483647 : this.HostName.GetHashCode()) ^
                //将HostPhone进行按位异或运算处理
                (this.HostPhone == null ? 2147483647 : this.HostPhone.GetHashCode()) ^
                //将CarModel进行按位异或运算处理
                (this.CarModel == null ? 2147483647 : this.CarModel.GetHashCode()) ^
                //将CarColor进行按位异或运算处理
                (this.CarColor == null ? 2147483647 : this.CarColor.GetHashCode()) ^
                //将ExpireTime进行按位异或运算处理
                (this.ExpireTime == null ? 2147483647 : this.ExpireTime.GetHashCode()) ^
                //将QueryPwd进行按位异或运算处理
                (this.QueryPwd == null ? 2147483647 : this.QueryPwd.GetHashCode()) ^
                //将IDNumber进行按位异或运算处理
                (this.IDNumber == null ? 2147483647 : this.IDNumber.GetHashCode()) ^
                //将DayPhone进行按位异或运算处理
                (this.DayPhone == null ? 2147483647 : this.DayPhone.GetHashCode()) ^
                //将NightPhone进行按位异或运算处理
                (this.NightPhone == null ? 2147483647 : this.NightPhone.GetHashCode()) ^
                //将CarType进行按位异或运算处理
                (this.CarType == null ? 2147483647 : this.CarType.GetHashCode()) ^
                //将InstallTime进行按位异或运算处理
                (this.InstallTime == null ? 2147483647 : this.InstallTime.GetHashCode()) ^
                //将InstallMan进行按位异或运算处理
                (this.InstallMan == null ? 2147483647 : this.InstallMan.GetHashCode()) ^
                //将InstallType进行按位异或运算处理
                (this.InstallType == null ? 2147483647 : this.InstallType.GetHashCode()) ^
                //将IsWaste进行按位异或运算处理
                this.IsWaste.GetHashCode() ^
                //将AreaPower进行按位异或运算处理
                this.AreaPower.GetHashCode() ^
                //将Remark进行按位异或运算处理
                (this.Remark == null ? 2147483647 : this.Remark.GetHashCode()) ^
                //将DOAlarmInstalled进行按位异或运算处理
                (this.DOAlarmInstalled == null ? 2147483647 : this.DOAlarmInstalled.GetHashCode()) ^
                //将DOAlarmEnable进行按位异或运算处理
                (this.DOAlarmEnable == null ? 2147483647 : this.DOAlarmEnable.GetHashCode()) ^
                //将DOAlarmValue进行按位异或运算处理
                (this.DOAlarmValue == null ? 2147483647 : this.DOAlarmValue.GetHashCode()) ^
                //将DOSMSSentTime进行按位异或运算处理
                (this.DOSMSSentTime == null ? 2147483647 : this.DOSMSSentTime.GetHashCode()) ^
                //将DOSMSHasSent进行按位异或运算处理
                (this.DOSMSHasSent == null ? 2147483647 : this.DOSMSHasSent.GetHashCode()) ^
                //将IsToGB进行按位异或运算处理
                this.IsToGB.GetHashCode() ^
                //将ParaData进行按位异或运算处理
                (this.ParaData == null ? 2147483647 : this.ParaData.GetHashCode()) ^
                //将Corpid进行按位异或运算处理
                (this.Corpid == null ? 2147483647 : this.Corpid.GetHashCode()) ^
                //将Deptid进行按位异或运算处理
                (this.Deptid == null ? 2147483647 : this.Deptid.GetHashCode()) ^
                //将LastTime进行按位异或运算处理
                (this.LastTime == null ? 2147483647 : this.LastTime.GetHashCode()) ^
                //将PulseCoeff进行按位异或运算处理
                this.PulseCoeff.GetHashCode() ^
                //将CTime进行按位异或运算处理
                this.CTime.GetHashCode() ^
                //将AccCheck进行按位异或运算处理
                this.AccCheck.GetHashCode();
        }
        /// <summary>
        /// 将当前CICarInfo数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前CICarInfo数据模型对象转换成字符串副本
            return
                "[" +
                //将No转换成字符串
                this.No + "," +
                //将CarPlateNo转换成字符串
                this.CarPlateNo + "," +
                //将Motorcade转换成字符串
                this.Motorcade + "," +
                //将InstallType转换成字符串
                this.InstallType + "," +
                //将IsWaste转换成字符串
                this.IsWaste + "," +
                //将AreaPower转换成字符串
                this.AreaPower + "," +
                //将IsToGB转换成字符串
                this.IsToGB + "," +
                //将PulseCoeff转换成字符串
                this.PulseCoeff + "," +
                //将CTime转换成字符串
                this.CTime + "," +
                //将AccCheck转换成字符串
                this.AccCheck +
                "]";
        }
        #endregion

        public void Configure(EntityTypeBuilder<CICarInfoMod> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            {
                entityBuilder.ToTable("CICarInfo");
                entityBuilder.HasComment("设备管理");
                entityBuilder.HasKey(e => e.No);
            }
        }
    }
}
